import Vue from 'vue'
import Router from 'vue-router'

const login = () => { import('@/components/login/login') }
const base = () => { import('@/components/base/base') }
const goods = () => { import('@/components/goods/goods') }

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/home',
      name: 'base',
      component: base,
      children: [
        {
          path: 'goods',
          name: 'goods',
          component: goods
        }
      ]
    }
  ]
})
